package com.kexuexiong.demo.bear.httpApi;

import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import com.kexuexiong.demo.bear.common.dto.Result;
import com.kexuexiong.demo.bear.httpApi.dto.req.ZdzReq;
import org.slf4j.event.Level;
import retrofit2.Response;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

import java.util.Map;

@RetrofitClient(baseUrl = "${test.baseUrl}", poolName = "httpApi",
        enableLog = true, logLevel = Level.DEBUG)
public interface HttpApi {

    @GET("api/loginByPhone")
    Response<Result<String>> getResult(@Query("id") Long id);

    @POST("api/loginByPhone")
    Object loginByPhone(@Body ZdzReq<Map<String, Object>> dto);
}
